Skip to content

feat: add CA derivation FFI bindings (validPathInfoCA, getDerivationOutputIds, queryRealisation) - #670

Open
domenkozar wants to merge 1 commit into
hercules-ci:masterfrom
domenkozar:ca-derivations
Open

feat: add CA derivation FFI bindings (validPathInfoCA, getDerivationOutputIds, queryRealisation)#670
domenkozar wants to merge 1 commit into
hercules-ci:masterfrom
domenkozar:ca-derivations

Conversation

@domenkozar

Copy link
Copy Markdown
Contributor

…utputIds, queryRealisation)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@roberth

roberth commented Mar 23, 2026

Copy link
Copy Markdown
Member

ca-derivations is receiving some stabilizing love now.

The following two bindings will affect the FFI bindings you're adding, so if it's not too much of a burden, I would prefer to only implement the new interface.

NixOS/nix#15322 / DrvOutput uses StorePath instead of hash modulo

This is already merged and breaks two functions:

  • getDerivationOutputIds: Constructs DrvOutput{hash, outputName} using hashes from hashDerivationModulo(). After this PR, DrvOutput takes a StorePath, not a Hash. The constructor, to_string(), and the overall approach need to be reworked.

  • queryRealisation: Calls DrvOutput::parse(id). The signature changed to DrvOutput::parse(const StoreDirConfig&, std::string_view), so this won't compile.

NixOS/nix#15289 / Remove "deep realisations"

I expect this to be merged soon. It tracks dependencies better, avoiding some frankenbuild problems.
Here it will additionally break:

  • *queryRealisation: Iterates over real->dependentRealisations, which is removed. The Haskell return type includes dependent realisations as a Map ByteString ByteString`; that part of the API would need to be dropped.

  • Semantic change: deep realisations (keyed on unresolved drv paths) are no longer stored. Callers that query with an unresolved derivation's DrvOutput will always get Nothing. They would need to resolve the derivation first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants